# -*- coding:utf-8 -*-
__author__ = 'Forcs'

from abc import abstractmethod

class Jsonable(object):

    @abstractmethod
    def to_json(self):
        """
        子类实现该方法，将对象属性序列化成dict
        :return:
        """
        pass

    @abstractmethod
    def from_json(self, json):
        """
        子类实现该方法，将json反序列化到对象的属性中
        :param json:
        :return:
        """
        pass

